package com.itheima.dao;

import com.itheima.pojo.BlogSort;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BlogSortDao extends Mapper<BlogSort> {
    @Select("SELECT s.* from t_blog_sort s,t_blog b where s.uid=b.blog_sort_uid and\n" +
            "b.status=1 group by blog_sort_uid desc")
    List<BlogSort> selectSortByCite();

    @Select("SELECT uid,sort_name,content,create_time,update_time,status,sort,click_count FROM t_blog_sort  WHERE  status = 1 order by click_count DESC")
    List<BlogSort> selectSortByClickCount();

}
